#!/usr/bin/env sh

# Credits for Mashn
# https://www.notabug.org/mhf/Dotfiles/src/master/home/.bin/record

set $(slop -q -o -f '%x %y %w %h')

notify-send "FFmpeg" "Gravação de tela iniciada!"

# -framerate 25 \
	#-q:v 5 \
ffmpeg -s $3x$4 \
	-f x11grab \
	-i :0.0+$1,$2 \
	-f alsa \
	-ac 2 \
	-i hw:1 \
	-y $HOME/record_`date +%d-%m-%Y_%H%M`.mkv
	>/dev/null 2>&1
